from rest_framework import serializers
from . import models
class UserSerializer(serializers.ModelSerializer):
    departname=serializers.CharField(source='depart.name',read_only=True)
    class Meta:
        model=models.User
        fields="__all__"


class DepartmentSerializer(serializers.ModelSerializer):
    class Meta:
        model=models.Department
        fields="__all__"
